Skip to content

Add model parameters to Estimator, and bump library version to 1.13.0 #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 1, 2018

Conversation

RodrigoAtAWS
Copy link
Contributor

@RodrigoAtAWS RodrigoAtAWS commented Oct 30, 2018

Issue #, if available:

Description of changes:

This code change adds the following changes to Estimators:

  • Added the ability to set the input mode on each channel. The input mode will default to whatever's set on the Estimator, but if a channel specifies its own input mode it will override that value.
  • Added two new parameters to the Estimator class: model_uri, which points to pre-existing model artifacts in S3 or locally, and model_channel_name (default: 'model'). When both are set and a user calls Estimator.fit(), the estimator will create a new input channel under that name, pointing to the contents of model_uri and using SageMaker's recommended settings for model artifact consumption.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have updated the changelog with a description of my changes (if appropriate)
  • I have updated any necessary documentation (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-io
Copy link

codecov-io commented Oct 30, 2018

Codecov Report

Merging #450 into master will decrease coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #450      +/-   ##
==========================================
- Coverage   93.75%   93.67%   -0.08%     
==========================================
  Files          55       55              
  Lines        4034     4079      +45     
==========================================
+ Hits         3782     3821      +39     
- Misses        252      258       +6
Impacted Files Coverage Δ
src/sagemaker/__init__.py 100% <100%> (ø) ⬆️
src/sagemaker/amazon/amazon_estimator.py 88.8% <100%> (+0.08%) ⬆️
src/sagemaker/tensorflow/estimator.py 93.57% <100%> (+0.04%) ⬆️
src/sagemaker/mxnet/estimator.py 100% <100%> (ø) ⬆️
src/sagemaker/session.py 89.51% <100%> (+0.05%) ⬆️
src/sagemaker/chainer/estimator.py 100% <100%> (ø) ⬆️
src/sagemaker/pytorch/estimator.py 100% <100%> (ø) ⬆️
src/sagemaker/job.py 96.11% <100%> (+1.11%) ⬆️
src/sagemaker/estimator.py 90.07% <100%> (+0.55%) ⬆️
src/sagemaker/local/image.py 88.92% <0%> (-1.9%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5595af...9d838ec. Read the comment docs.

@RodrigoAtAWS RodrigoAtAWS requested a review from laurenyu October 30, 2018 19:22
@RodrigoAtAWS RodrigoAtAWS self-assigned this Oct 30, 2018
@RodrigoAtAWS RodrigoAtAWS changed the title Add incremental training model parameters to Estimator, and bump library version to 1.13.0 Add model parameters to Estimator, and bump library version to 1.13.0 Oct 30, 2018
@RodrigoAtAWS RodrigoAtAWS requested a review from nadiaya October 31, 2018 18:29
Copy link
Contributor

@laurenyu laurenyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure @eslesar-aws has a chance at some point to look at the doc changes as well

@@ -601,6 +644,7 @@ def __init__(self, entry_point, source_dir=None, hyperparameters=None, enable_cl
Valid values are defined in the Python logging module.
code_location (str): Name of the S3 bucket where custom code is uploaded (default: None).
If not specified, default bucket created by ``sagemaker.session.Session`` is used.
**kwargs: Additional kwargs passed to the ``EstimatorBase`` constructor.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line (it's already on l. 652)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove, thanks for pointing it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I'm curious how I even got that line there. I'll do a second pass over the code changes.

README.rst Outdated
Incremental Training
~~~~~~~~~~~~~~~~~~~~

Incremental training allows you to bring a pre-trained model into a SageMaker training job, to use as a starting point for a new model.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: remove the comma in this sentence

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will also remove.

laurenyu
laurenyu previously approved these changes Nov 1, 2018
Copy link
Contributor

@laurenyu laurenyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

giving an approve with the assumption there will be a follow-up PR to fix the two small issues. (talked with @nadiaya offline.)

Removed unnecessary comma from sentence.
Removed duplicated line
@nadiaya nadiaya merged commit 507f2cd into aws:master Nov 1, 2018
pdasamzn pushed a commit to pdasamzn/sagemaker-python-sdk that referenced this pull request Nov 1, 2018
…aws#450)

* Add incremental training model parameters to Estimator, and bump library version to 1.13.0

* Update README.rst

Removed unnecessary comma from sentence.

* Update estimator.py

Removed duplicated line
apacker pushed a commit to apacker/sagemaker-python-sdk that referenced this pull request Nov 15, 2018
metrizable pushed a commit to metrizable/sagemaker-python-sdk that referenced this pull request Dec 1, 2020
…3.0 (aws#450)

* add spark image_uri_retriever support for framework_version 3.0

* changing framework_version to 2.4 in spark unit tests

* fix spark integration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants